<template>
	<view class="dialog">
		<view class="mask"></view>
		<view class="layer">
			<view class="inner">
				<view class="close" @click="hanvieweClose">
					<image src="https://wx.2024csnl.com/static/lottery2-close.png" mode="widthFix" alt="">
				</view>
				<view class="thead">
					<image src="https://wx.2024csnl.com/static/lottery2-rule.png" alt="">
				</view>
				<view class="box">
					<view class="context">
						<view>
							<text>{{title}}</text>
						</view>
						<view>
							<text>{{content}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			title: {
				type: String,
				default: '',
			},
			content: {
				type: String,
				default: '',
			},
		},
		data() {
			return {}
		},
		methods: {
			hanvieweClose() {
				this.$emit('callback', {})
			}
		}
	}
</script>

<style lang="less" scoped>
	.dialog {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 999;

		.mask {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 0;
			background: rgba(0, 0, 0, .8);
		}

		.layer {
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 1;
			display: flex;
			justify-content: space-evenly;
			flex-direction: column;
		}

		.inner {
			position: relative;
			animation: zoomIn .3s ease;
		}

		.close {
			position: absolute;
			bottom: -60px;
			left: 50%;
			margin: 0 0 0 -25px;
			padding: 10px;
			z-index: 10;

			image {
				display: block;
				width: 30px;
				height: 30px;
			}
		}

		.thead {
			position: relative;
			left: 5vw;
			right: 0;
			z-index: 2;

			image {
				display: block;
				width: 90vw;
				height: 36vw;
			}
		}

		.box {
			position: relative;
			margin: -10vw 16vw 0;
		}

		.context {
			position: relative;
			padding: 12vw 30px 30px;
			border-radius: 10px;
			background: -webkit-linear-gradient(top, #ffffff, #f7d097);
			line-height: 1.6;
			font-size: 28rpx;
			color: #b02a10;
		}
	}
</style>